package com.stylefeng.guns.rest.Util;

public class CityInf implements  java.io.Serializable,Comparable<CityInf>{
    private static final long serialVersionUID = 1L;
    private String pyFirst;
    private String cityId;
    private String cityName;
    private String pyAll;
    private String pyHead;

    public String getPyFirst() {
        return pyFirst;
    }

    public void setPyFirst(String pyFirst) {
        this.pyFirst = pyFirst;
    }

    public String getCityId() {
        return cityId;
    }

    public void setCityId(String cityId) {
        this.cityId = cityId;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getPyAll() {
        return pyAll;
    }

    public void setPyAll(String pyAll) {
        this.pyAll = pyAll;
    }

    public String getPyHead() {
        return pyHead;
    }

    public void setPyHead(String pyHead) {
        this.pyHead = pyHead;
    }

    @Override
    public int compareTo(CityInf cityInf) {
        if (this == cityInf) return 0;
        if (cityInf == null || getClass() != cityInf.getClass()) return -1;
        if(cityInf==null || cityInf.getPyFirst()==null){
            return 1;
        }
        if(this.getPyFirst()==null){
            return -1;
        }
        return this.getPyFirst().compareTo(cityInf.getPyFirst());
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CityInf cityInf = (CityInf) o;
        return pyFirst != null ? pyFirst.equals(cityInf.pyFirst) : cityInf.pyFirst == null;
    }

    @Override
    public int hashCode() {
        return pyFirst != null ? pyFirst.hashCode() : 0;
    }
}
